import QtQuick 1.1
import com.nokia.meego 1.0

Page {
    id: mainPage
    lockInLandscape: true
    orientationLock: PageOrientation.LockLandscape
    width: 761
    height: 480

    //The background
    Image {
        id: background
        source: "images/background.png"
        x: 0
        y: 0
    }

    //One button in order to start a new game
    Image {
        id: playbutton
        source: "images/playbutton.png"
        x: 321
        y: 156
        opacity: 0.7 //The opacity is changed when pressed so that the user know that the touch is being detected
        MouseArea {
            anchors.fill: parent
            onPressed: parent.opacity = 1 //When the user touches the button, it goes totally opaque...
            onReleased: parent.opacity = 0.7 //...But when released, it returns to the original opacity
            onClicked: mainPage.pageStack.push(appWindow.pairingPage);
        }
    }

    //Another button, this time for accessing the help page
    Image {
        id: howtoplaybutton
        source: "images/howtoplaybutton.png"
        x: 321
        y: 251
        opacity: 0.7
        MouseArea {
            anchors.fill: parent
            onPressed: parent.opacity = 1
            onReleased: parent.opacity = 0.7
            onClicked: mainPage.pageStack.push(appWindow.helpPage1);

        }
    }

    //The third button's purpose is simply to close the game, opening the GoodByePage
    Image {
        id: quitbutton
        source: "images/quitbutton.png"
        x: 321
        y: 348
        opacity: 0.7
        MouseArea {
            anchors.fill: parent
            onPressed: parent.opacity = 1
            onReleased: parent.opacity = 0.7
            onClicked: mainPage.pageStack.push(appWindow.goodByePage);
        }
    }
}
